<include file="public:header" />
<!--管理员管理-->
<div class="pad_lr_10">
<if condition="$search['id'] elt 0">
  <form name="searchform" method="get" >
    <table width="100%" cellspacing="0" class="search_form">
        <tbody>
            <tr>
                <td>
                <div class="explain_col">
                    <input type="hidden" name="g" value="admin" />
                    <input type="hidden" name="m" value="admin" />
                    <input type="hidden" name="a" value="index" />
                    <input type="hidden" name="menuid" value="{$menuid}" />
                    &nbsp;&nbsp;{:L('please_select')}{:L('store')}：
                    <select class="J_cate_select mr10" data-pid="0" data-uri="{:U('region/ajax_getchilds',array('type'=>'store'))}" data-selected="{$search.selected_ids}"></select>
                    <input type="hidden" name="regionId" id="J_cate_id" value="{$search.cate_id}" />   
                    &nbsp;&nbsp;请选择角色
                    <select name="roleId">
                        <option value="">请选择</option>
                        <volist name="roleList" id="val">
                            <option <if condition="$key eq $search['roleId']"> selected=""</if> value="{$key}">{$val}</option>
                        </volist>
                    </select> 
                    <br />
					&nbsp;&nbsp;sim :
					<input type="text" name="sim" class="input-text" size="12" value="{$search.sim}" />
					&nbsp;&nbsp;sim_sn :
					<input type="text" name="simSn" class="input-text" size="12" value="{$search.simSn}" />     
					&nbsp;&nbsp;imei :
					<input type="text" name="imei" class="input-text" size="12" value="{$search.imei}" /> 
					&nbsp;&nbsp;用户名 :
					<input type="text" name="userName" class="input-text" size="12" value="{$search.userName}" /> 
                    <input type="submit" name="search" class="btn" value="搜索" />
					
                </div>
                </td>
            </tr>
        </tbody>
    </table>
    </form>
</if>

    <div class="J_tablelist table_list" data-acturi="{:U('admin/ajax_edit')}">
        <table width="100%" cellspacing="0">
            <thead>
            <tr>
                <th width="40"><input type="checkbox" name="checkall" class="J_checkall"></th>
                <th width="40">ID</th>
                <th><span data-tdtype="order_by" data-field="userName">{:L('admin_userName')}</span></th>
                <th><span data-tdtype="order_by" data-field="roleId">{:L('admininrole')}</span></th>
                <th>区域</th>
                <th>职位</th>
                <th>手机号码</th>
                <th>电子邮件</th>
                <th><span data-tdtype="order_by" data-field="lastTime">{:L('lasttime')}</span></th>
      			<th><span data-tdtype="order_by" data-field="lastip">{:L('lastip')}</span></th>
                <th><span data-tdtype="order_by" data-field="status">{:L('status')}</span></th>
                <th width=100>{:L('operations_manage')}</th>
            </tr>
            </thead>
    	    <tbody>
            <volist name="list" id="val" >
            <tr>
                <td align="center"><input type="checkbox" class="J_checkitem" value="{$val.id}"></td>
                <td align="center">{$val.id}</td>
                <td align="center"><span data-tdtype="edit" data-field="userName" class="tdedit" data-id="{$val.id}">{$val.userName}</span></td>
                <td align="center">{$val.role.name}</td>
                <td align="center">{:getRegionName($val['regionId'],3)}</td>
                
                <td align="center">{$val.jobPost}</td>
                <td align="center">{$val.phone}</td>
                <td align="center">{$val.email}</td>
                <td align="center">
                    <if condition="$val['lastTime']">
                        {$val.lastTime|date='Y-m-d H:i:s',###}
                        <else />
                        未登录过
                    </if>
                </td>
                <td align="center">{$val.lastIp}</td>
                <td align="center">
                    <img data-tdtype="toggle" data-field="status" data-id="{$val.id}" data-value="{$val.status}" src="__STATIC__/images/admin/toggle_<if condition="$val.status eq 0">disabled<else/>enabled</if>.gif" />
                </td>
                <td align="center">
                
                    <a href="{:U('admin/edit',array('id'=>$val['id']))}">编辑</a>
                    
                    <a href="javascript:;" class="J_confirmurl" data-uri="{:U('admin/delete', array('id'=>$val['id']))}" data-msg="{:sprintf(L('confirm_delete_one'),$val['userName'])}">{:L('delete')}</a>
                </td>
            </tr>
            </volist>
    	   </tbody>
        </table>
    </div>
    <div class="btn_wrap_fixed">
		<label class="select_all mr10"><input type="checkbox" name="checkall" class="J_checkall">{:L('select_all')}/{:L('cancel')}</label>
    	<input type="button" class="btn" data-tdtype="batch_action" data-acttype="ajax" data-uri="{:U('admin/delete')}" data-name="id" data-msg="{:L('confirm_delete')}" value="{:L('delete')}" />
		<div id="pages">{$page}</div>
    </div>
</div>
<include file="public:footer" />
<script>
$('.J_cate_select').cate_select({top_option:lang.all});
</script>
</body>
</html>